﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using TA.Entities;
using TA.WebControls;

public static class _ComboBoxExtensions
{
	public static T GetValue<T>(this ComboBox cmb) where T : ItemWithId<int>, new()
	{
		try
		{
			return new T { Id = int.Parse(cmb.Value) };
		}
		catch
		{
			return null;
		}
	}
}
